package com.ymttest.database.mapping.agentrebate;

import com.ymttest.database.model.agentrebate.Ymt_AgentRebate;
import com.ymttest.database.model.agentrebate.Ymt_AgentRebateExample;
import java.util.List;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.type.JdbcType;

public interface Ymt_AgentRebateMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table Ymt_AgentRebate
     *
     * @mbggenerated Sun Jun 28 10:53:14 CST 2020
     */
    @Insert({
        "insert into Ymt_AgentRebate (AgentRebateID, AgentTypeId, ",
        "CatalogId, ProductId, ",
        "UserId, RebateValue, ",
        "RebateType, Action, ",
        "CreateTime, UpdateTime)",
        "values (#{agentRebateID,jdbcType=INTEGER}, #{agentTypeId,jdbcType=INTEGER}, ",
        "#{catalogId,jdbcType=VARCHAR}, #{productId,jdbcType=VARCHAR}, ",
        "#{userId,jdbcType=INTEGER}, #{rebateValue,jdbcType=DECIMAL}, ",
        "#{rebateType,jdbcType=INTEGER}, #{action,jdbcType=INTEGER}, ",
        "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})"
    })
    int insert(Ymt_AgentRebate record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table Ymt_AgentRebate
     *
     * @mbggenerated Sun Jun 28 10:53:14 CST 2020
     */
    @InsertProvider(type=Ymt_AgentRebateSqlProvider.class, method="insertSelective")
    int insertSelective(Ymt_AgentRebate record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table Ymt_AgentRebate
     *
     * @mbggenerated Sun Jun 28 10:53:14 CST 2020
     */
    @SelectProvider(type=Ymt_AgentRebateSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="AgentRebateID", property="agentRebateID", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="AgentTypeId", property="agentTypeId", jdbcType=JdbcType.INTEGER),
        @Result(column="CatalogId", property="catalogId", jdbcType=JdbcType.VARCHAR),
        @Result(column="ProductId", property="productId", jdbcType=JdbcType.VARCHAR),
        @Result(column="UserId", property="userId", jdbcType=JdbcType.INTEGER),
        @Result(column="RebateValue", property="rebateValue", jdbcType=JdbcType.DECIMAL),
        @Result(column="RebateType", property="rebateType", jdbcType=JdbcType.INTEGER),
        @Result(column="Action", property="action", jdbcType=JdbcType.INTEGER),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<Ymt_AgentRebate> selectByExample(Ymt_AgentRebateExample example);
}